﻿using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AutoFlatnessTest
{
    public class ConModel
    {
        public static ConModel Data { get; set; }

        static ConModel()
        {
            Data = JsonConvert.DeserializeObject<ConModel>(File.ReadAllText(LocalFile.ConPath, Encoding.UTF8));
        }
        public string SqlServer { get; set; }
        public string SqlServer5 { get; set; }
        /// <summary>
        /// Api接口地址
        /// </summary>
        public string Api { get; set; }
        /// <summary>
        /// 设备代码
        /// </summary>
        public int DeviceCode { get; set; }
        /// <summary>
        /// 录入值
        /// </summary>
        public List<decimal> InputVal { get; set; }
        /// <summary>
        /// 抽测值
        /// </summary>
        public List<string> ExtrVal { get; set; }
        /// <summary>
        /// 汇川
        /// </summary>
        public ConfigIpPort PlcLoca { get; set; }
        /// <summary>
        /// 扫码枪
        /// </summary>
        public ConfigIpPort ScanLoca { get; set; }
        /// <summary>
        /// 扫描仪
        /// </summary>
        public ConfigIpPort QrLoca { get; set; }

    }


    public class ConfigIpPort
    {
        /// <summary>
        /// Ip地址
        /// </summary>
        public string Ip { get; set; }
        /// <summary>
        /// 端口
        /// </summary>
        public int Port { get; set; }
    }
}
